package com.example.myapplication.base;

/**
 * 数据的基类
 * <p/>
 */
public class Data {
    //    public String imageBase = BuildConfig.ManageBaseImgUrl;
    protected String msg="no Msg";
    protected boolean success;
    protected int code;

    protected String err;
    protected boolean encode;

    protected String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }



    public boolean isEncode() {
        return encode;
    }

    public void setEncode(boolean encode) {
        this.encode = encode;
    }

    public String getMessage() {
        if(msg==null)return err;
        return msg;
    }

    public void setMessage(String message) {
        this.msg= message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "Data{" +
                "message='" + msg + '\'' +
                ", success=" + success +
                ", code=" + code +
                '}';
    }
}